import os
fm = "word.txt"
cnt = ""
st1 = ""
with open(fm, 'r', encoding='utf-8') as f0:
    cnt = f0.read()

for c in cnt:
    v =ord(c) 
    if v==10 or v==13 or v==32:
        st1+=c
    if v >64 and v<123:
        st1 +=c
for i in range(3):
    st1 = st1.replace('\n\n','\n')
lt = st1.split('\n')
ls = [ele for ele in lt if len(ele)>4]
st1 = '\n'.join(ls)
fl = ['n flfl','adj ','flfl','adj fl','nvfifl','adj fl','n yyfl adj','n v  n ','n yyfl','v fifi'\
    ,'vtnfi nfl']
for f in fl:
    st1=st1.replace(f,'')

fi = ['fl\n','fl[\n','fi\n','n v  v\n','fi adj\n','fi]\n','n  fl\n']
for f in fi:
    st1=st1.replace(f,'\n')




with open('temp.txt','w',encoding='utf-8')as f1:
    f1.write(st1)

# print(st1)



# for i in range(10):
#     print("%d/%d"%(i,10))
